<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/taglibs.jsp" %>

<h1>
	<fmt:message key="user.view.title" />
</h1>
<a href="new"><fmt:message key="user.view.addbutton" />
</a>
<br />
<br />

<table collspadding="0px" width="800px">
	<tr>
		<th width="30px"><fmt:message key="user.form.id" />
		</th>
		<th width="100px"><fmt:message key="user.form.username" />
		</th>
		<th width="100px"><fmt:message key="user.form.firstname" />
		</th>
		<th width="100px"><fmt:message key="user.form.surname" />
		</th>
		<th width="150px"><fmt:message key="user.form.email" />
		</th>
		<th width="50px"><fmt:message key="user.form.telephone" />
		</th>
		<th width="100px"><fmt:message key="user.form.createdon" />
		</th>
		<th width="20px">&nbsp;</th>
	</tr>
	<c:url var="editUserUrl" value="/admin/user/" />
	<c:url var="deleteUserUrl" value="/admin/user/delete/" />
	<c:forEach items="${users}" var="user">
		<tr>
			<td><c:out value="${user.id}" />
			</td>
			<td><a href="${editUsersUrl}${user.id}"><c:out
						value="${user.username}" />
			</a>
			</td>
			<td><c:out value="${user.firstName}" />
			</td>
			<td><c:out value="${user.surname}" />
			</td>
			<td><c:out value="${user.email}" />
			</td>
			<td><c:out value="${user.telephone}" />
			</td>
			<td><c:out value="${user.createdOn}" />
			</td>
			<td><a href="${deleteUserUrl}${user.id}"><fmt:message
						key="user.view.deleteuser" />
			</a>
			</td>
		</tr>
	</c:forEach>
</table>
